package com.qianfeng.controller;

import com.qianfeng.entity.Category;
import com.qianfeng.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
import java.util.Map;

@Controller
public class TestDemo {
    @Autowired
    private CategoryService categoryService;

    @RequestMapping(value = "/test")
    public String TestDemo(Map map){
        System.out.println("ssm测试整合");
        List<Category> categoryList = categoryService.getCategoryList();
        map.put("categoryList",categoryList);
        return "result";
    }

}
